home *** CD-ROM | disk | FTP | other *** search
/ ShareWare OnLine 2 / ShareWare OnLine Volume 2 (CMS Software)(1993).iso / graphics / pcx2pcl.zip / READ.ME < prev   
Text File  |  1993-01-20  |  12KB  |  156 lines

  1. &k2S&l8D
  2.  ╔═══════════════════════════════════════════════════════════════════════════╗
  3.  ║                                                                           ║
  4.  ║   We know you'll love this program, enjoy.                                ║
  5.  ║ ═════════════════════════════════════════════════════════════════════════ ║
  6.  ║                                                                           ║
  7.  ║   Convert PCX to PCL with --"PCX2PCL"                                     ║
  8.  ║                                                                           ║
  9.  ║   Using PCX2PCL.EXE                                                       ║
  10.  ║                                                                           ║
  11.  ║   This program allows you to print PCX image files directly               ║
  12.  ║   to the laser printer or anywhere from within your application.          ║
  13.  ║                                                                           ║
  14.  ║   To print a PCX image within your application:                           ║
  15.  ║   Read and print the file, using file handling functions.                 ║
  16.  ║   (depending on the language you use)                                     ║
  17.  ║   See programming examples for 'C ' and Clipper below.                    ║
  18.  ║                                                                           ║
  19.  ║   Convert the PCX image into a PCL file, and print the PCX                ║
  20.  ║   image to the printer using DOS commands or any other operating system   ║
  21.  ║   command to transfer the file to the printer.                            ║
  22.  ║                                                                           ║
  23.  ║           COPY <pclfile.pcl> LPT1 /B                                      ║
  24.  ║                                                                           ║
  25.  ║       You may also use this file within a PJL file.                       ║
  26.  ║                                                                           ║
  27.  ║       Running options for PCX2PCL.EXE                                     ║
  28.  ║                                                                           ║
  29.  ║       PCX2PCL <pcxfile> [pclfile] [switches]                              ║
  30.  ║                                                                           ║
  31.  ║       Default output is LPT1, if you do not specify <pclfile>             ║
  32.  ║                                                                           ║
  33.  ║       Switches are as follows :                                           ║
  34.  ║       /i    causes the program to invert the image.                       ║
  35.  ║       /rxxx results in xxx DPI resolution output.                         ║
  36.  ║                                                                           ║
  37.  ║             Valid resolutions are 75 (the printer default),100,           ║
  38.  ║             150,and 300.(200 and 600 are valid for 600 DPI                ║
  39.  ║             printers.) If you do not use this switch, you will have       ║
  40.  ║             to set the resolution before sending the file to the          ║
  41.  ║             printer, otherwise the image will be printed in the           ║
  42.  ║             default 75 DPI.                                               ║
  43.  ║                                                                           ║
  44.  ║             Skipping this switch gives you the flexibility to             ║
  45.  ║             select the resolution and control the size of image           ║
  46.  ║             printed. ( the next release of this program will let          ║
  47.  ║             you change the scale of the image as you wish.)               ║
  48.  ║                                                                           ║
  49.  ║             The code to set the raster resolution for the image is        ║
  50.  ║             <esc>*t#R                                                     ║
  51.  ║             where # represents a valid resolution value.                  ║
  52.  ║             This code must be send to the printer just before the         ║
  53.  ║             image file. The image is printed at the current CAP           ║
  54.  ║             (cursor position).                                            ║
  55.  ║                                                                           ║
  56.  ║             Programmers using ProHP - Laser printer Library, have         ║
  57.  ║             functions to control and position Image files within          ║
  58.  ║             their applications. A great supplement to the existing        ║
  59.  ║             control ProHP gives to the HP LaserJet family. For            ║
  60.  ║             ProHP info call 1 (800) 374-7734, or [70712,3072]             ║
  61.  ║                                                                           ║
  62.  ║             To receive the next version of PCX2PCL, which will have       ║
  63.  ║             scaling and pattern options, please send your name and        ║
  64.  ║             address with $5.00 ( USA 50 states or $15.- elsewhere)        ║
  65.  ║             to cover shipping costs to :                                  ║
  66.  ║ ═════════════════════════════════════════════════════════════════════════ ║
  67.  ║             I.L.A., Inc.                                                  ║
  68.  ║             520 W. Hwy 436 #1180                                          ║
  69.  ║             Altamonte Springs, FL 32714                                   ║
  70.  ║             Tel. (407) 774-7734 , (800) 374-7734                          ║
  71.  ║             Fax. (407) 774-6750                                           ║
  72.  ║                                                                           ║
  73.  ║             Please tell us what languages you program in, and where       ║
  74.  ║             you got a copy of PCX2PCL. Thanks.                            ║
  75.  ║             Comments and suggestions are welcome.                         ║
  76.  ║                                                                           ║
  77.  ║ ═════════════════════════════════════════════════════════════════════════ ║
  78.  ║                                                                           ║
  79.  ║   'C' Example :                                                           ║
  80.  ║                                                                           ║
  81.  ║   void printPCX(FILE *pclf, FILE * outf)                                  ║
  82.  ║   {                                                                       ║
  83.  ║      char ch;                                                             ║
  84.  ║      int f_in,f_out;                                                      ║
  85.  ║                                                                           ║
  86.  ║      if( (f_in = fopen( pclf, "rb" )) == NULL )                           ║
  87.  ║         exit(1);                                                          ║
  88.  ║      if( (f_out = fopen( outf, "wb" )) == NULL )                          ║
  89.  ║         exit(1);                                                          ║
  90.  ║         iobinary(f_out);  // raw mode                                     ║
  91.  ║         while (( ch = fgetc(f_in))) != EOF )                              ║
  92.  ║           fputc(ch,f_out);                                                ║
  93.  ║       fclose(f_in);                                                       ║
  94.  ║       fclose(f_out);                                                      ║
  95.  ║   }                                                                       ║
  96.  ║                                                                           ║
  97.  ║                                                                           ║
  98.  ║   Clipper Example:                                                        ║
  99.  ║                                                                           ║
  100.  ║   #define BUFFSIZE 1024                                                   ║
  101.  ║                                                                           ║
  102.  ║   Proc printPCX(cPcl, cLpt)                                               ║
  103.  ║   Local f_in, f_out, ch, nBytesR                                          ║
  104.  ║   Local cBuff:= space(BUFFSIZE)                                           ║
  105.  ║                                                                           ║
  106.  ║   f_in := fopen( cPcl , FO_READ)                                          ║
  107.  ║   f_out := fopen(cLpt, FO_READWRITE )                                     ║
  108.  ║   iobinary(f_out) // set binary mode  available in ProHP Library.         ║
  109.  ║                                                                           ║
  110.  ║   nBytesR := fread(f_in, @cBuff, BUFFSIZE)                                ║
  111.  ║   while (nBytesR == BUFFSIZE)                                             ║
  112.  ║       fwrite(f_out,cBuff)                                                 ║
  113.  ║       nBytesR := fread(f_in, @cBuff, BUFFSIZE)                            ║
  114.  ║   enddo                                                                   ║
  115.  ║   fwrite(f_out,left(cBuff,nBytesR)                                        ║
  116.  ║                                                                           ║
  117.  ║   fclose(f_in)                                                            ║
  118.  ║   ioascii(f_out)                                                          ║
  119.  ║   fclose(f_out)                                                           ║
  120.  ║                                                                           ║
  121.  ║   return                                                                  ║
  122.  ║                                                                           ║
  123.  ╚═══════════════════════════════════════════════════════════════════════════╝
  124.  
  125.  ╔═══════════════════════════════════════════════════════════════════════════╗
  126.  ║                                                                           ║
  127.  ║   PCX2PCL is copyrighted, and all rights are reserved.  It is being       ║
  128.  ║   released for demonstration. It may be tested, copied, uploaded to       ║
  129.  ║   public access bulletin boards, and distributed in any manner            ║
  130.  ║   where the recipient pays for no more than the cost of the               ║
  131.  ║   distribution.  All original files must be included.                     ║
  132.  ║                                                                           ║
  133.  ║   There are no royalties due for any programs using PCX2PCL.              ║
  134.  ║                                                                           ║
  135.  ║   DISTRIBUTION                                                            ║
  136.  ║                                                                           ║
  137.  ║   Bulletin boards and non-profit user groups may include PCX2PCL in       ║
  138.  ║   their libraries. PCX2PCL may be copied or posted for downloading        ║
  139.  ║   for the trial use by others subject to the following conditions:        ║
  140.  ║                                                                           ║
  141.  ║      1. All files must be distributed together in original,               ║
  142.  ║         unmodified form as ORIGINALLY NAMED.                              ║
  143.  ║                                                                           ║
  144.  ║      2. No files may be added to the package or archive.                  ║
  145.  ║                                                                           ║
  146.  ║                                                                           ║
  147.  ║   --------------------------------------------------------------------    ║
  148.  ║   * ProHP is a trade mark of I.L.A., Inc.                                 ║
  149.  ║   * CLIPPER is a trade mark of Computer Associates.                       ║
  150.  ║   --------------------------------------------------------------------    ║
  151.  ║                                                                           ║
  152.  ╚═══════════════════════════════════════════════════════════════════════════╝
  153.  
  154.  - End of READ.ME -
  155.  
  156.